Disabler = Class.create({
	initialize : function(spec) {
		this.element = $(spec.elementId);
		this.element.observe("change", this.disableElement.bindAsEventListener(this));
	},

	disableElement : function() {
		var value = this.element.value;
		var select = jQuery(this.element).parents("tr").find("select");
		
		if("COMMON" == value) {
			select.attr("disabled", "disabled");
		} else {
			select.removeAttr("disabled");
		}
	}
})

Tapestry.Initializer.disabler = function(spec) {
    new Disabler(spec);
}